diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 740d3fc..6416d15 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -962,7 +962,9 @@
 		status = this->waitfunc (mtd, this, FL_WRITING);
 		/* See if device thinks it succeeded */
 		if (status & 0x01) {
-			DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write, page 0x%08x, ", __FUNCTION__, page);
+			MTDDEBUG (MTD_DEBUG_LEVEL0,
+			          "%s: Failed write, page 0x%08x, ",
+			          __FUNCTION__, page);
 			return -EIO;
 		}
 	} else {
@@ -1010,7 +1012,9 @@
 		for (j = 0; j < eccsteps; j++) {
 			/* Loop through and verify the data */
 			if (this->verify_buf(mtd, &this->data_poi[datidx], mtd->eccsize)) {
-				DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page);
+				MTDDEBUG (MTD_DEBUG_LEVEL0, "%s: "
+				          "Failed write verify, page 0x%08x ",
+				          __FUNCTION__, page);
 				goto out;
 			}
 			datidx += mtd->eccsize;
@@ -1018,7 +1022,9 @@
 			if (!hweccbytes)
 				continue;
 			if (this->verify_buf(mtd, &this->oob_buf[oobofs], hweccbytes)) {
-				DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page);
+				MTDDEBUG (MTD_DEBUG_LEVEL0, "%s: "
+				          "Failed write verify, page 0x%08x ",
+				          __FUNCTION__, page);
 				goto out;
 			}
 			oobofs += hweccbytes;
@@ -1029,7 +1035,9 @@
 		 */
 		if (oobmode) {
 			if (this->verify_buf(mtd, &oob_buf[oobofs], mtd->oobsize - hweccbytes * eccsteps)) {
-				DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page);
+				MTDDEBUG (MTD_DEBUG_LEVEL0, "%s: "
+				          "Failed write verify, page 0x%08x ",
+				          __FUNCTION__, page);
 				goto out;
 			}
 		} else {
@@ -1042,9 +1050,11 @@
 				for (i = 0; i < ecccnt; i++) {
 					int idx = oobsel->eccpos[i];
 					if (oobdata[idx] != oob_buf[oobofs + idx] ) {
-						DEBUG (MTD_DEBUG_LEVEL0,
+						MTDDEBUG (MTD_DEBUG_LEVEL0,
 						"%s: Failed ECC write "
-						"verify, page 0x%08x, " "%6i bytes were succesful\n", __FUNCTION__, page, i);
+						"verify, page 0x%08x, "
+						"%6i bytes were succesful\n",
+						__FUNCTION__, page, i);
 						goto out;
 					}
 				}
@@ -1131,11 +1141,13 @@
 	int	oobreadlen;
 
 
-	DEBUG (MTD_DEBUG_LEVEL3, "nand_read_ecc: from = 0x%08x, len = %i\n", (unsigned int) from, (int) len);
+	MTDDEBUG (MTD_DEBUG_LEVEL3, "nand_read_ecc: from = 0x%08x, len = %i\n",
+	          (unsigned int) from, (int) len);
 
 	/* Do not allow reads past end of device */
 	if ((from + len) > mtd->size) {
-		DEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: Attempt read beyond end of device\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0,
+		          "nand_read_ecc: Attempt read beyond end of device\n");
 		*retlen = 0;
 		return -EINVAL;
 	}
@@ -1252,7 +1264,7 @@
 					 * generator for an error, reads back the syndrome and
 					 * does the error correction on the fly */
 					if (this->correct_data(mtd, &data_poi[datidx], &oob_data[i], &ecc_code[i]) == -1) {
-						DEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: "
+						MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: "
 							"Failed ECC read, page 0x%08x on chip %d\n", page, chipnr);
 						ecc_failed++;
 					}
@@ -1291,7 +1303,9 @@
 			}
 
 			if (ecc_status == -1) {
-				DEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: " "Failed ECC read, page 0x%08x\n", page);
+				MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: "
+				          "Failed ECC read, page 0x%08x\n",
+				          page);
 				ecc_failed++;
 			}
 		}
@@ -1388,7 +1402,8 @@
 	struct nand_chip *this = mtd->priv;
 	int	blockcheck = (1 << (this->phys_erase_shift - this->page_shift)) - 1;
 
-	DEBUG (MTD_DEBUG_LEVEL3, "nand_read_oob: from = 0x%08x, len = %i\n", (unsigned int) from, (int) len);
+	MTDDEBUG (MTD_DEBUG_LEVEL3, "nand_read_oob: from = 0x%08x, len = %i\n",
+	          (unsigned int) from, (int) len);
 
 	/* Shift to get page */
 	page = (int)(from >> this->page_shift);
@@ -1402,7 +1417,8 @@
 
 	/* Do not allow reads past end of device */
 	if ((from + len) > mtd->size) {
-		DEBUG (MTD_DEBUG_LEVEL0, "nand_read_oob: Attempt read beyond end of device\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0,
+		          "nand_read_oob: Attempt read beyond end of device\n");
 		*retlen = 0;
 		return -EINVAL;
 	}
@@ -1488,7 +1504,8 @@
 
 	/* Do not allow reads past end of device */
 	if ((from + len) > mtd->size) {
-		DEBUG (MTD_DEBUG_LEVEL0, "nand_read_raw: Attempt read beyond end of device\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0,
+		          "nand_read_raw: Attempt read beyond end of device\n");
 		return -EINVAL;
 	}
 
@@ -1626,14 +1643,16 @@
 	u_char *oobbuf, *bufstart;
 	int	ppblock = (1 << (this->phys_erase_shift - this->page_shift));
 
-	DEBUG (MTD_DEBUG_LEVEL3, "nand_write_ecc: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len);
+	MTDDEBUG (MTD_DEBUG_LEVEL3, "nand_write_ecc: to = 0x%08x, len = %i\n",
+	          (unsigned int) to, (int) len);
 
 	/* Initialize retlen, in case of early exit */
 	*retlen = 0;
 
 	/* Do not allow write past end of device */
 	if ((to + len) > mtd->size) {
-		DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: Attempt to write past end of page\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0,
+		          "nand_write_ecc: Attempt to write past end of page\n");
 		return -EINVAL;
 	}
 
@@ -1695,7 +1714,8 @@
 		 */
 		ret = nand_write_page (mtd, this, page, &oobbuf[oob], oobsel, (--numpages > 0));
 		if (ret) {
-			DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: write_page failed %d\n", ret);
+			MTDDEBUG (MTD_DEBUG_LEVEL0,
+			          "nand_write_ecc: write_page failed %d\n", ret);
 			goto out;
 		}
 		/* Next oob page */
@@ -1719,7 +1739,8 @@
 				page - startpage,
 				oobbuf, oobsel, chipnr, (eccbuf != NULL));
 			if (ret) {
-				DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: verify_pages failed %d\n", ret);
+				MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: "
+				          "verify_pages failed %d\n", ret);
 				goto out;
 			}
 			*retlen = written;
@@ -1752,7 +1773,8 @@
 	if (!ret)
 		*retlen = written;
 	else
-		DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: verify_pages failed %d\n", ret);
+		MTDDEBUG (MTD_DEBUG_LEVEL0,
+		          "nand_write_ecc: verify_pages failed %d\n", ret);
 
 out:
 	/* Deselect and wake up anyone waiting on the device */
@@ -1777,7 +1799,8 @@
 	int column, page, status, ret = -EIO, chipnr;
 	struct nand_chip *this = mtd->priv;
 
-	DEBUG (MTD_DEBUG_LEVEL3, "nand_write_oob: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len);
+	MTDDEBUG (MTD_DEBUG_LEVEL3, "nand_write_oob: to = 0x%08x, len = %i\n",
+	          (unsigned int) to, (int) len);
 
 	/* Shift to get page */
 	page = (int) (to >> this->page_shift);
@@ -1791,7 +1814,8 @@
 
 	/* Do not allow write past end of page */
 	if ((column + len) > mtd->oobsize) {
-		DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: Attempt to write past end of page\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: "
+		          "Attempt to write past end of page\n");
 		return -EINVAL;
 	}
 
@@ -1821,8 +1845,9 @@
 		this->cmdfunc (mtd, NAND_CMD_SEQIN, mtd->oobblock, page & this->pagemask);
 		if (!ffchars) {
 			if (!(ffchars = kmalloc (mtd->oobsize, GFP_KERNEL))) {
-				DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: "
-					   "No memory for padding array, need %d bytes", mtd->oobsize);
+				MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: "
+				          "No memory for padding array, "
+				          "need %d bytes", mtd->oobsize);
 				ret = -ENOMEM;
 				goto out;
 			}
@@ -1847,7 +1872,8 @@
 
 	/* See if device thinks it succeeded */
 	if (status & 0x01) {
-		DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " "Failed write, page 0x%08x\n", page);
+		MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: "
+		          "Failed write, page 0x%08x\n", page);
 		ret = -EIO;
 		goto out;
 	}
@@ -1859,7 +1885,8 @@
 	this->cmdfunc (mtd, NAND_CMD_READOOB, column, page & this->pagemask);
 
 	if (this->verify_buf(mtd, buf, len)) {
-		DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " "Failed write verify, page 0x%08x\n", page);
+		MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: "
+		          "Failed write verify, page 0x%08x\n", page);
 		ret = -EIO;
 		goto out;
 	}
@@ -1919,12 +1946,14 @@
 	for (i = 0; i < count; i++)
 		total_len += (int) vecs[i].iov_len;
 
-	DEBUG (MTD_DEBUG_LEVEL3,
-	       "nand_writev: to = 0x%08x, len = %i, count = %ld\n", (unsigned int) to, (unsigned int) total_len, count);
+	MTDDEBUG (MTD_DEBUG_LEVEL3,
+	          "nand_writev: to = 0x%08x, len = %i, count = %ld\n",
+	          (unsigned int) to, (unsigned int) total_len, count);
 
 	/* Do not allow write past end of page */
 	if ((to + total_len) > mtd->size) {
-		DEBUG (MTD_DEBUG_LEVEL0, "nand_writev: Attempted write past end of device\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0,
+		          "nand_writev: Attempted write past end of device\n");
 		return -EINVAL;
 	}
 
@@ -2117,24 +2146,26 @@
 	int page, len, status, pages_per_block, ret, chipnr;
 	struct nand_chip *this = mtd->priv;
 
-	DEBUG (MTD_DEBUG_LEVEL3,
-	       "nand_erase: start = 0x%08x, len = %i\n", (unsigned int) instr->addr, (unsigned int) instr->len);
+	MTDDEBUG (MTD_DEBUG_LEVEL3, "nand_erase: start = 0x%08x, len = %i\n",
+	          (unsigned int) instr->addr, (unsigned int) instr->len);
 
 	/* Start address must align on block boundary */
 	if (instr->addr & ((1 << this->phys_erase_shift) - 1)) {
-		DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Unaligned address\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Unaligned address\n");
 		return -EINVAL;
 	}
 
 	/* Length must align on block boundary */
 	if (instr->len & ((1 << this->phys_erase_shift) - 1)) {
-		DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Length not block aligned\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0,
+		          "nand_erase: Length not block aligned\n");
 		return -EINVAL;
 	}
 
 	/* Do not allow erase past end of device */
 	if ((instr->len + instr->addr) > mtd->size) {
-		DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Erase past end of device\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0,
+		          "nand_erase: Erase past end of device\n");
 		return -EINVAL;
 	}
 
@@ -2156,7 +2187,8 @@
 	/* Check the WP bit */
 	/* Check, if it is write protected */
 	if (nand_check_wp(mtd)) {
-		DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Device is write protected!!!\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0,
+		          "nand_erase: Device is write protected!!!\n");
 		instr->state = MTD_ERASE_FAILED;
 		goto erase_exit;
 	}
@@ -2186,7 +2218,8 @@
 
 		/* See if block erase succeeded */
 		if (status & 0x01) {
-			DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: " "Failed erase, page 0x%08x\n", page);
+			MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_erase: "
+			          "Failed erase, page 0x%08x\n", page);
 			instr->state = MTD_ERASE_FAILED;
 			instr->fail_addr = (page << this->page_shift);
 			goto erase_exit;
@@ -2229,7 +2262,7 @@
 {
 	struct nand_chip *this = mtd->priv;
 
-	DEBUG (MTD_DEBUG_LEVEL3, "nand_sync: called\n");
+	MTDDEBUG (MTD_DEBUG_LEVEL3, "nand_sync: called\n");
 
 	/* Grab the lock and see if the device is available */
 	nand_get_device (this, mtd, FL_SYNCING);
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index eff76d7..a97743b 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -1038,8 +1038,8 @@
 	block = (int) (offs >> (this->bbt_erase_shift - 1));
 	res = (this->bbt[block >> 3] >> (block & 0x06)) & 0x03;
 
-	DEBUG (MTD_DEBUG_LEVEL2, "nand_isbad_bbt(): bbt info for offs 0x%08x: (block %d) 0x%02x\n",
-		(unsigned int)offs, res, block >> 1);
+	MTDDEBUG (MTD_DEBUG_LEVEL2, "nand_isbad_bbt(): bbt info for offs 0x%08x: "
+	          "(block %d) 0x%02x\n", (unsigned int)offs, res, block >> 1);
 
 	switch ((int)res) {
 	case 0x00:	return 0;
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index d1b9f8f..d32e382 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -293,22 +293,22 @@
 	ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS);
 
 	if (ctrl & ONENAND_CTRL_ERROR) {
-		DEBUG(MTD_DEBUG_LEVEL0,
-		      "onenand_wait: controller error = 0x%04x\n", ctrl);
+		MTDDEBUG (MTD_DEBUG_LEVEL0,
+		          "onenand_wait: controller error = 0x%04x\n", ctrl);
 		return -EAGAIN;
 	}
 
 	if (ctrl & ONENAND_CTRL_LOCK) {
-		DEBUG(MTD_DEBUG_LEVEL0,
-		      "onenand_wait: it's locked error = 0x%04x\n", ctrl);
+		MTDDEBUG (MTD_DEBUG_LEVEL0,
+		          "onenand_wait: it's locked error = 0x%04x\n", ctrl);
 		return -EIO;
 	}
 
 	if (interrupt & ONENAND_INT_READ) {
 		ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS);
 		if (ecc & ONENAND_ECC_2BIT_ALL) {
-			DEBUG(MTD_DEBUG_LEVEL0,
-			      "onenand_wait: ECC error = 0x%04x\n", ecc);
+			MTDDEBUG (MTD_DEBUG_LEVEL0,
+			          "onenand_wait: ECC error = 0x%04x\n", ecc);
 			return -EBADMSG;
 		}
 	}
@@ -524,13 +524,14 @@
 	int thislen;
 	int ret = 0;
 
-	DEBUG(MTD_DEBUG_LEVEL3, "onenand_read_ecc: from = 0x%08x, len = %i\n",
-	      (unsigned int)from, (int)len);
+	MTDDEBUG (MTD_DEBUG_LEVEL3, "onenand_read_ecc: "
+	          "from = 0x%08x, len = %i\n",
+	          (unsigned int)from, (int)len);
 
 	/* Do not allow reads past end of device */
 	if ((from + len) > mtd->size) {
-		DEBUG(MTD_DEBUG_LEVEL0,
-		      "onenand_read_ecc: Attempt read beyond end of device\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0, "onenand_read_ecc: "
+		          "Attempt read beyond end of device\n");
 		*retlen = 0;
 		return -EINVAL;
 	}
@@ -561,8 +562,8 @@
 			break;
 
 		if (ret) {
-			DEBUG(MTD_DEBUG_LEVEL0,
-			      "onenand_read_ecc: read failed = %d\n", ret);
+			MTDDEBUG (MTD_DEBUG_LEVEL0,
+			          "onenand_read_ecc: read failed = %d\n", ret);
 			break;
 		}
 
@@ -615,16 +616,17 @@
 	int read = 0, thislen, column;
 	int ret = 0;
 
-	DEBUG(MTD_DEBUG_LEVEL3, "onenand_read_oob: from = 0x%08x, len = %i\n",
-	      (unsigned int)from, (int)len);
+	MTDDEBUG (MTD_DEBUG_LEVEL3, "onenand_read_oob: "
+	          "from = 0x%08x, len = %i\n",
+	          (unsigned int)from, (int)len);
 
 	/* Initialize return length value */
 	*retlen = 0;
 
 	/* Do not allow reads past end of device */
 	if (unlikely((from + len) > mtd->size)) {
-		DEBUG(MTD_DEBUG_LEVEL0,
-		      "onenand_read_oob: Attempt read beyond end of device\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0, "onenand_read_oob: "
+		          "Attempt read beyond end of device\n");
 		return -EINVAL;
 	}
 
@@ -652,8 +654,8 @@
 			break;
 
 		if (ret) {
-			DEBUG(MTD_DEBUG_LEVEL0,
-			      "onenand_read_oob: read failed = %d\n", ret);
+			MTDDEBUG (MTD_DEBUG_LEVEL0,
+			          "onenand_read_oob: read failed = %d\n", ret);
 			break;
 		}
 
@@ -733,23 +735,24 @@
 	int written = 0;
 	int ret = 0;
 
-	DEBUG(MTD_DEBUG_LEVEL3, "onenand_write_ecc: to = 0x%08x, len = %i\n",
-	      (unsigned int)to, (int)len);
+	MTDDEBUG (MTD_DEBUG_LEVEL3, "onenand_write_ecc: "
+	          "to = 0x%08x, len = %i\n",
+	          (unsigned int)to, (int)len);
 
 	/* Initialize retlen, in case of early exit */
 	*retlen = 0;
 
 	/* Do not allow writes past end of device */
 	if (unlikely((to + len) > mtd->size)) {
-		DEBUG(MTD_DEBUG_LEVEL0,
-		      "onenand_write_ecc: Attempt write to past end of device\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0, "onenand_write_ecc: "
+		          "Attempt write to past end of device\n");
 		return -EINVAL;
 	}
 
 	/* Reject writes, which are not page aligned */
 	if (unlikely(NOTALIGNED(to)) || unlikely(NOTALIGNED(len))) {
-		DEBUG(MTD_DEBUG_LEVEL0,
-		      "onenand_write_ecc: Attempt to write not page aligned data\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0, "onenand_write_ecc: "
+		          "Attempt to write not page aligned data\n");
 		return -EINVAL;
 	}
 
@@ -772,8 +775,8 @@
 
 		ret = this->wait(mtd, FL_WRITING);
 		if (ret) {
-			DEBUG(MTD_DEBUG_LEVEL0,
-			      "onenand_write_ecc: write filaed %d\n", ret);
+			MTDDEBUG (MTD_DEBUG_LEVEL0,
+			          "onenand_write_ecc: write filaed %d\n", ret);
 			break;
 		}
 
@@ -782,8 +785,8 @@
 		/* Only check verify write turn on */
 		ret = onenand_verify_page(mtd, (u_char *) buf, to, block, page);
 		if (ret) {
-			DEBUG(MTD_DEBUG_LEVEL0,
-			      "onenand_write_ecc: verify failed %d\n", ret);
+			MTDDEBUG (MTD_DEBUG_LEVEL0,
+			          "onenand_write_ecc: verify failed %d\n", ret);
 			break;
 		}
 
@@ -836,16 +839,17 @@
 	int column, status;
 	int written = 0;
 
-	DEBUG(MTD_DEBUG_LEVEL3, "onenand_write_oob: to = 0x%08x, len = %i\n",
-	      (unsigned int)to, (int)len);
+	MTDDEBUG (MTD_DEBUG_LEVEL3, "onenand_write_oob: "
+	          "to = 0x%08x, len = %i\n",
+	          (unsigned int)to, (int)len);
 
 	/* Initialize retlen, in case of early exit */
 	*retlen = 0;
 
 	/* Do not allow writes past end of device */
 	if (unlikely((to + len) > mtd->size)) {
-		DEBUG(MTD_DEBUG_LEVEL0,
-		      "onenand_write_oob: Attempt write to past end of device\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0, "onenand_write_oob: "
+		          "Attempt write to past end of device\n");
 		return -EINVAL;
 	}
 
@@ -904,28 +908,29 @@
 	int len;
 	int ret = 0;
 
-	DEBUG(MTD_DEBUG_LEVEL3, "onenand_erase: start = 0x%08x, len = %i\n",
-	      (unsigned int)instr->addr, (unsigned int)instr->len);
+	MTDDEBUG (MTD_DEBUG_LEVEL3, "onenand_erase: start = 0x%08x, len = %i\n",
+	          (unsigned int)instr->addr, (unsigned int)instr->len);
 
 	block_size = (1 << this->erase_shift);
 
 	/* Start address must align on block boundary */
 	if (unlikely(instr->addr & (block_size - 1))) {
-		DEBUG(MTD_DEBUG_LEVEL0, "onenand_erase: Unaligned address\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0,
+		          "onenand_erase: Unaligned address\n");
 		return -EINVAL;
 	}
 
 	/* Length must align on block boundary */
 	if (unlikely(instr->len & (block_size - 1))) {
-		DEBUG(MTD_DEBUG_LEVEL0,
-		      "onenand_erase: Length not block aligned\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0,
+		          "onenand_erase: Length not block aligned\n");
 		return -EINVAL;
 	}
 
 	/* Do not allow erase past end of device */
 	if (unlikely((instr->len + instr->addr) > mtd->size)) {
-		DEBUG(MTD_DEBUG_LEVEL0,
-		      "onenand_erase: Erase past end of device\n");
+		MTDDEBUG (MTD_DEBUG_LEVEL0,
+		          "onenand_erase: Erase past end of device\n");
 		return -EINVAL;
 	}
 
@@ -950,12 +955,12 @@
 		/* Check, if it is write protected */
 		if (ret) {
 			if (ret == -EPERM)
-				DEBUG(MTD_DEBUG_LEVEL0,
-				      "onenand_erase: Device is write protected!!!\n");
+				MTDDEBUG (MTD_DEBUG_LEVEL0, "onenand_erase: "
+				          "Device is write protected!!!\n");
 			else
-				DEBUG(MTD_DEBUG_LEVEL0,
-				      "onenand_erase: Failed erase, block %d\n",
-				      (unsigned)(addr >> this->erase_shift));
+				MTDDEBUG (MTD_DEBUG_LEVEL0, "onenand_erase: "
+				          "Failed erase, block %d\n",
+				          (unsigned)(addr >> this->erase_shift));
 			instr->state = MTD_ERASE_FAILED;
 			instr->fail_addr = addr;
 			goto erase_exit;
@@ -988,7 +993,7 @@
  */
 void onenand_sync(struct mtd_info *mtd)
 {
-	DEBUG(MTD_DEBUG_LEVEL3, "onenand_sync: called\n");
+	MTDDEBUG (MTD_DEBUG_LEVEL3, "onenand_sync: called\n");
 
 	/* Grab the lock and see if the device is available */
 	onenand_get_device(mtd, FL_SYNCING);
diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c
index 5a610ee..87344ab 100644
--- a/drivers/mtd/onenand/onenand_bbt.c
+++ b/drivers/mtd/onenand/onenand_bbt.c
@@ -156,9 +156,9 @@
 	block = (int)(offs >> (bbm->bbt_erase_shift - 1));
 	res = (bbm->bbt[block >> 3] >> (block & 0x06)) & 0x03;
 
-	DEBUG(MTD_DEBUG_LEVEL2,
-	      "onenand_isbad_bbt: bbt info for offs 0x%08x: (block %d) 0x%02x\n",
-	      (unsigned int)offs, block >> 1, res);
+	MTDDEBUG (MTD_DEBUG_LEVEL2,
+	          "onenand_isbad_bbt: bbt info for offs 0x%08x: (block %d) 0x%02x\n",
+	          (unsigned int)offs, block >> 1, res);
 
 	switch ((int)res) {
 	case 0x00:
